#include <stdint.h>
#include "fsl_soundcard.h"
#include "fsl_sgtl5000_driver.h"
Go to the source code of this file.
| Data Fields |
|
uint16_t |
bit_samp |
|
|
uint16_t |
bitSamp |
|
|
uint16_t |
block_align |
|
|
uint16_t |
blockAlign |
|
|
uint32_t |
byte_rate |
|
|
uint32_t |
byteRate |
|
|
uint16_t |
channels |
|
|
uint8_t |
data_flag[4] |
|
|
uint8_t |
dataFlag[4] |
|
|
uint8_t |
fmt[4] |
|
|
uint32_t |
fmt_len |
|
|
uint32_t |
fmtLen |
|
|
uint32_t |
length |
|
|
uint8_t |
riff[4] |
|
|
uint32_t |
samp_freq |
|
|
uint32_t |
sampFreq |
|
|
uint32_t |
size |
|
|
uint16_t |
tag |
|
|
uint8_t |
wave_flag[4] |
|
|
uint8_t |
waveFlag[4] |
|
| Data Fields |
|
uint32_t * |
data |
|
|
wave_header_t |
header |
|
|
uint32_t * |
pData |
|
| #define WAVE_FILE_HEADER_SIZE |
Standard Windows PCM wave file header struct.
| typedef uint32_t(* APP_GET_DATA_FUNC)(uint32_t NumBytesReq, uint8_t **ppDada, uint32_t offset) |
Get data callback functions Prototypes API funcions
| int PLAYSOUND_GetWaveFileInfo |
( |
uint8_t * |
pBuffer, |
|
|
wave_file_t * |
pWave |
|
) |
| |
This function decode Windows PCM wave file data and, if success, loaded file header information into struct instance.
- Parameters
-
| [in] | pBuffer | Pointer to a wave file start address. |
| [in] | pWave | Pointer to a wave_file struct. |
- Returns
- 0:succ 1:fail
| void PLAYSOUND_Init |
( |
void |
| ) |
|
This function will initialize controller(K70's sai moudle) and decoder(SGTL5000) and config them with default values for play audio.
- Note
- 8 bit is not supported in SGTL5000
Before calling this function, we must make sure PLAYSOUND_Init has alrady called. This function will play audio according to wave file data which acquired by a user callback function. Prototyoe of "GetData" function: uint32_t APP_GetData(uint32_t NumBtytesReq, uint8_t **ppData, uint32_t offset)
- Parameters
-
| [in] | fpAppGetData | Pointer to a function which is called by PLAYSOUND_Play routine for getting data. |
- Returns
- 0:succ 1:fail